﻿using System;
using Linq2Crm.ObjectModel.Attributes;
using SilverCrmSoap.CrmSdk;


namespace SLApp_Test.Model
{
   [CrmEntityMapping("promx_serviceitem", "promx_name", "promx_serviceitemid")]
   public class ServiceItem : BaseEntity
   {
      [CrmFieldMapping("promx_projectid")]
      public EntityReference Project { get; set; }

      [CrmFieldMapping("promx_hourlyrate")]
      public decimal Rate { get; set; }

      [CrmFieldMapping("promx_employeeinprojectid")]
      public EntityReference ProjectAssignment { get; set; }

      [CrmFieldMapping("promx_totalhours")]
      public double TotalTime { get; set; }

      [CrmFieldMapping("promx_invoiceid")]
      public EntityReference Invoice { get; set; }

      [CrmFieldMapping("promx_totalcost")]
      public decimal Cost { get; set; }

      [CrmFieldMapping("transactioncurrencyid")]
      public EntityReference CurrencyId { get; set; }

      [CrmFieldMapping("promx_invoicingdate")]
      public DateTime? InvoicingDate { get; set; }

      [CrmFieldMapping("promx_bookingstate")]
      public bookingstate BookingState { get; set; }

      [CrmFieldMapping("promx_bookingdate")]
      public DateTime? BookingDate { get; set; }

      [CrmFieldMapping("promx_taxratelookup")]
      public EntityReference TaxRate { get; set; }

      [CrmFieldMapping("promx_serviceitemdiscount")]
      public decimal DiscountAmount { get; set; }

      [CrmFieldMapping("promx_serviceitemtypelookup")]
      public EntityReference ServiceItemTypeLookup { get; set; }

      [CrmFieldMapping("promx_serviceitemdiscountpercentage")]
      public double DiscountPercentage { get; set; }
   }
}